if (!jsx3.lang.Class.forName("ux.cdb.admin.approvePkg.ContracProvinceList")) {

/**
 * Define the <code>name of class</code> class.
 * This class inherit from <code>jsx3.gui.Block<code> GUI class.
 */
jsx3.Class.defineClass(
		"ux.cdb.admin.approvePkg.ContracProvinceList",
		jsx3.gui.Block,
		null,
		function (objRoot) {
			/**
			* tool functions:
			*/
			objRoot.prototype.property = function(name, token) {
				return ux.megatron.Main.getServer().getDynamicProperty(name, token);
			};

			/**
			 * This method will be called after UI file has deserialized.
			 */
			objRoot.prototype.onAfterDeserialize = function() {
				this.mtxContracProvinceList = this.get("mtxProvRcpPkg");
				/*
				this.curPage = ux.megatron.Main.getServer().getDynamicProperty("@cdb@apvPkg@curPage");
				this.pageSize = ux.megatron.Main.getServer().getDynamicProperty("@cdb@apvPkg@pageNum");
				this.pagebar = this.get("blkPageWheel");
                this.pagebar.initialize();
				this.pagebar.bindWithMatrix(this, this.loadPagination, this.matrix);
				*/
			}

			/**
			* initialize Province receipt package UI
			*/
			objRoot.prototype.initUI = function(parentId){
			}

			objRoot.prototype.onLoadContractDetailDlg = function(){
				var parent = ux.megatron.Main.getServer().getBodyBlock();
				var me = this;
				ux.megatron.Main.loadUIResourceAsync(parent,
						"ux.cdb.admin", 
						"ux/cdb/admin/approvePkg/ui/contractDetailDlg.xml",
						me,me.onLoadcontractDetialDlgSuccess);
			}

			objRoot.prototype.onLoadcontractDetialDlgSuccess = function(objEvent){
				this.detailDlg = objEvent.obj;
				objEvent.obj.opener = this;
				var selectedid = this.mtxContracProvinceList.getSelectedNodes().get(0).getAttribute("batchApprovalInfoId");
				this.detailDlg.get("blkWorld").onInitializeUI(selectedid);
			}

			objRoot.prototype.onLoadonlyContractDetailDlg = function(){
				var parent = ux.megatron.Main.getServer().getBodyBlock();
				var me = this;
				ux.megatron.Main.loadUIResource(parent,
						"ux.cdb.admin",
						"ux/cdb/admin/approvePkg/ui/contractTabDialog.xml",
						true);
			} 

			/**
			* load Province Receipt Package Data
			*/
			objRoot.prototype.loadProvRcpPkgData = function(parentId){
				var me = this;
				ux.megatron.util.Dwr.callDwr("RetailStudentLoanBatchAuditingUCC",
						"getBatchApprovalInfoListByConcentrateApprovalInfoId",[parentId],
						me,me.callBackProvRcpPkgData,
						"RetailStudentLoanBatchAuditingUCC");
			}
			objRoot.prototype.callBackProvRcpPkgData = function(dwrObjectList){
				if(!dwrObjectList){
					jsx3.log("DWR callBackProvRcpPkgData failed");
					return;
				}
				var cdfDoc = ux.megatron.util.Dwr.toCdfDocument(dwrObjectList.content.data,"jsxroot",null);
				this.mtxProvRcpPkg.setSourceXML(cdfDoc);
				this.mtxProvRcpPkg.repaintData();
			}
		});
}

